/*

Example for different sending methods

https://github.com/sui77/rc-switch/

*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {

Serial.begin(9600);

// Transmitter is connected to Arduino Pin #0

mySwitch.enableTransmit(2); // Optional set pulse length.

// mySwitch.setPulseLength（320）;

// Optional set protocol （default is 1， will work for most outlets）

// mySwitch.setProtocol（2）;

// Optional set number of transmission repetitions.

// mySwitch.setRepeatTransmit（15）;

}

void loop() {

/* Same switch as above， but using decimal code */

mySwitch.send(1531148, 24);
Serial.println("1531148");

delay(2000);

mySwitch.send(1531139, 24);
Serial.println("1531139");

delay(2000);

}
